<!-- 冈好办-详情 -->
<template>
  <div class="container">
      <div class="title">{{info.title}}</div>
      <div class="desc">
          <div class="time">{{info.publishTimeStr}}</div>
      </div>
      <u-parse :html="info.content" :tag-style="style"></u-parse>
  </div>
</template>
<script>
import { getDetailByIdAndTypeCodeAPI } from '../../api/gang'

export default {
  data() {
      return {
        id: "",
        style: {
            p: "margin-bottom: 10px; line-height: 1.5",
        },
        loading: false,
        info: {},
      };
  },
  computed: {
      
  },
  onShareAppMessage(){},
  onLoad(options) {
    let { id, title, typeCode } = options;
    this.id = id;
    if (title) wx.setNavigationBarTitle({ title });
    wx.showLoading({
        title: "加载中...",
    });
    this.loading = true;
    getDetailByIdAndTypeCodeAPI({ id, typeCode }).then((res) => {
      this.info = res.data;
      this.loading = false;
      wx.hideLoading();
    })
  },
};
</script>
<style scoped lang="scss">
@import "../../assets/scss/common.scss";

.container {
  padding: 15px;
  .title {
      font-size: 20px;
      font-weight: bold;
      margin-bottom: 20px;
  }
  .desc {
      display: flex;
      justify-content: space-between;
      font-size: 14px;
      margin-bottom: 20px;
      color: $color_secondary-text;
  }
  .collect {
      font-size: 14px;
      margin-bottom: 20px;
      text-align: right;
      color: #023884;
  }
  .content {
      img {
          width: 100%;
      }
  }
}
</style>